package com.dnjn.mes.biz.domain;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dnjn.mes.common.core.domain.BaseEntity;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;

import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 班次记录
 * </p>
 *
 * @author Amber
 * @since 2023-08-29
 */
@Accessors(chain = true)

@Getter
@Setter
@TableName("mes_workforce_shift")
public class MesWorkforceShift extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * PK
     */
    @TableId(value = "shift_id", type = IdType.ASSIGN_ID)
    private Long shiftId;

    /**
     * mes_workforce_config.workforce_id
     */
    private Long workforceId;

    /**
     * 班次名 eg.早班
     */
    private String workforceLabel;

    @TableField("`current_date`")
    private LocalDate currentDate;

    private Long equipmentId;

    /**
     * 产量
     */
    private Integer capacity;

    /**
     * 已开始上班打卡
     */
    private String hasClockin;

    /**
     * 已开始下班打卡
     */
    private String hasClockout;

    /**
     * 是否删除|0-否 1-是|valid
     */
    private String deleted;

    /**
     * 关联打卡用户列表
     */
    @TableField(exist = false)
    private List<MesWorkforceShiftClocking> clockingList;


    @TableField(exist = false)
    private Long userId;

    /**
     * 接受前端返回的打卡用户信息，
     */
    @TableField(exist = false)
    private MesWorkforceShiftClocking shiftClocking;

    @TableField(exist = false)
    private Double ratio;

}
